<?php
get_header();
$nowcatid = $_GET["nowcatid"];
?> 
	<div id="cont">
		<div id="main">
			<div id="fudong">
				<div id="detail">
					<span id="mainbaoxie" class="lovelink2"><a href="http://www.uujog.com">index</a>=><a href="?page_id=355&nowcatid=<?php echo $nowcatid ?>"><?php
						 $categories = get_categories();
						  foreach ($categories as $cat) {
						  	$catid = $cat->cat_ID;
						  	if($catid == $nowcatid){
						  		echo $catname = $cat->name;
						  	}
						  } 
					 ?></a>=><?php echo the_title(); ?></span>
					<div id="c_left">
						 <h4><?php echo the_title(); ?></h4>
						 <span>Author：<?php 	
								 $authorid = $post->post_author;
								 the_author_meta( "display_name", $authorid ); 							
			
						 ?></span>
						 <span>Date：<?php echo the_time(); ?></span>
						 <p id="D_cont"><?php echo $post->post_content  ?></p>
					</div>
					<div id="detail_right">
						<h2 id="zuilove">Top</h2>
						<ul id="detail_right_left">
						<?php
							query_posts('showposts=12&orderby=date&cat='.$nowcatid);
								
							$i=0;
							
							if ( have_posts() ) : while ( have_posts() ) : the_post();
							$i++;
							if($i <=3){
						?>
							<li class="lovelink1"><?php echo $i; ?>&nbsp;<a href="<?php echo the_permalink(); ?>&nowcatid=<?php echo $nowcatid ?>"><?php the_title(); ?></a></li>
						<?php 
							}else{
						?>
							<li class="lovelink2"><?php echo $i; ?>&nbsp;<a href="<?php echo the_permalink(); ?>&nowcatid=<?php echo $nowcatid ?>"><?php the_title(); ?></a></li>
						<?php }
							endwhile; else:
							endif;
							wp_reset_query();
						?>
						</ul>
					</div>
				</div>
			</div>
			<div id="moduan"></div>
		</div>
	</div>

<?php get_footer();?>